
# this document is compile by scons #
# simpleos.cn

import os, sys
import fnmatch

LOCAL_PATH = sys.path[0]

env = Environment()
env['ENV'] = {'PATH' : os.environ.get('PATH')}

#paths
#CODE_ROOT  = os.environ.get('CODE_ROOT')

cpppath = [
'/usr/local/include',
]

ccflags = [
'-O2',
'-g',
]

#sources
sources = [
LOCAL_PATH+'/src/floppy_boot_writer.c', 
]

###add single file
#sources.append('xxx.cpp')

###traverse folder
#other_source = []
#for root, dirnames, filenames in os.walk('path/to/source') :
#  for filename in fnmatch.filter(filenames, '*.c'):
#      other_source.append(os.path.join(root, filename)) 
#sources.extend(other_source);

###ignore win32 cpp
#sources.remove('xxx.c')


env.Program('boot_writer', 
  source=sources, 
  LINKFLAGS=['-s', '-pthread'],
  LIBS = [],
  LIBPATH=[],
  CPPPATH=cpppath,
  CCFLAGS=ccflags)

